// read image
IplImage* read_image(const char* filename, int iscolor = CV_LOAD_IMAGE_COLOR);

// save image
int save_image( const char* filename, const CvArr* image );

// read video from file
CvCapture* read_video( const char* filename );

// resize image
IplImage* resize_image(const CvArr* src, int Width, int Height,  int depth, int channels,  int interpolation=CV_INTER_LINEAR ); //bilinear interpolation (used by default)

// read a frame from video by giving frameID
IplImage* grabFrameByFrame(CvCapture* capture, int frameID);

// read a frame from video by giving timestamp
IplImage* grabFrameByTime(CvCapture* capture, int timeMSec);

/* get the video metadata */
int getVideoWidth(CvCapture* capture);


int getVideoHeight(CvCapture* capture);


double getVideoFrameRate(CvCapture* capture);


double getVideoFrameCount(CvCapture* capture);


double getVideoLength(CvCapture* capture);

int fade(CvCapture* capture, CvVideoWriter *writer, int from_time, int to_time, double ratio);

CvCapture* join(CvCapture* capture1, CvCapture* capture2, const char* filename);

CvCapture* resize_video(CvCapture* video, int Width, int Height, const char* filename);

CvCapture* cropVideo(CvCapture* video, int x, int y, int Width, int Height, const char* filename);

CvCapture* zoom(CvCapture* video, float w_rate, float h_rate , const char* filename);

CvCapture* img2video(IplImage* img, float duration,  const char* filename);

int* grabPixel(IplImage* img,  int x, int y);

CvCapture* cut(CvCapture* video, float t1,  float t2, const char* filename);